

function main() {
    const readline = require('readline').createInterface({
        input: process.stdin,
        output: process.stdout
    })
    
    readline.question('', data => {
        // console.log(`${data}`);
        var count = 0;
        while (data != 1) {
            if (isEven(data)) {
                data = data / 2;
                count += 1;
            } else {
                data = handleOdd(data);
                count += 1;
            }
        }
        console.log(`${count}`);
        readline.close()
    })
    
}

function isEven(data) {
    if (data % 2 == 0) {
        return true;
    } else {
        return false;
    }
}

function handleOdd(data) {
    if (isEven(data)) return;
    data = (3 * data + 1) / 2;
    return data;
}

// console.log(handleOdd(5));
// console.log(isEven(5));
// console.log(isEven(6));
main()